﻿using Server.Constant;
using Server.Framework.Message;
using Server.Model;
using System.Collections.Generic;
using System.Linq;

namespace Server.Message.Request
{
    /// <summary>
    /// Author: Leil
    /// Description: 请求角色列表
    /// CreateTime: 2020/5/13 10:07:46
    /// </summary>
    [MessageAttr(MessageId.REQUEST_ALLOT_PERMISSION)]
    class AllotPerReq : RequestBaseMessage
    {
        public int RoleId { get; set; }

        public List<AllotMenu> AllotMenuList { get; private set; }

        public override void Deserialize(byte[] buffer)
        {
            RequestAllotPermission msg = RequestAllotPermission.Parser.ParseFrom(buffer);
            RoleId = msg.RoleId;
            AllotMenuList = msg.AllotMenus.ToList();
        }
    }
}
